[IA64] fix stack unwinder.
authorIsaku Yamahata <yamahata@valinux.co.jp>
Mon, 25 Aug 2008 10:04:37 +0000 (19:04 +0900)
committerIsaku Yamahata <yamahata@valinux.co.jp>
Mon, 25 Aug 2008 10:04:37 +0000 (19:04 +0900)
The stack unwinder can be called in interrupt context. On the other
hand xmalloc() can't be called in interrupt context.
Don't call xmalloc() if in the interrupt context.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
xen/arch/ia64/linux-xen/unwind.c

index ed72425ef3918358a2e4b810c07bf11efdf7b527..d88827fad02af222f5b2f40a7c76cbe066a03d31 100644 (file)
@@ -91,9 +91,9 @@
 #endif
 
 #ifdef XEN
-#define alloc_reg_state()      xmalloc(struct unw_reg_state)
+#define alloc_reg_state()      ({in_irq()? NULL: xmalloc(struct unw_reg_state);})
 #define free_reg_state(usr)    xfree(usr)
-#define alloc_labeled_state()  xmalloc(struct unw_labeled_state)
+#define alloc_labeled_state()  ({in_irq()? NULL: xmalloc(struct unw_labeled_state);})
 #define free_labeled_state(usr)        xfree(usr)
 #else
 #define alloc_reg_state()      kmalloc(sizeof(struct unw_reg_state), GFP_ATOMIC)